import { pubStyles } from '../constant';
import { cloneDeep } from 'lodash';
export const WidgetVideo = {
  type: 'widget-video',
  label: '播放器',
  icon: 'icon-icon-player',
  options: {
    setups: [
      {
        type: 'el-input',
        label: '播放器',
        name: 'componentName',
        required: false,
        placeholder: '',
        value: '播放器'
      },
      {
        type: 'el-upload',
        label: '播放器连接',
        name: 'componentContent',
        required: false,
        placeholder: '',
        value: 'https://www.runoob.com/try/demo_source/mov_bbb.mp4'
      }
    ],
    // styles: [...cloneDeep(pubStyles)],
    styles: [
      // webFullScreen: false,
      // speedRate: ["0.75", "1.0", "1.25", "1.5", "2.0"], //播放倍速
      // autoPlay: false, //自动播放
      // loop: true, //循环播放
      // mirror: false, //镜像画面
      // ligthOff: false, //关灯模式
      // volume: 0.3, //默认音量大小
      // control: false, //是否显示控制器
      {
        type: 'el-input-number',
        label: '组件宽度',
        name: 'w',
        required: false,
        placeholder: '',
        value: 320 //默认宽320
      },
      {
        type: 'el-input-number',
        label: '组件高度',
        name: 'h',
        required: false,
        placeholder: '',
        value: 200 //默认高200
      },
      {
        type: 'el-color-picker',
        label: '主题色',
        name: 'color',
        placeholder: '',
        value: ''
      },
      {
        type: 'el-select',
        label: '是否显示控件',
        name: 'control',
        value: false,
        selectOptions: [
          {
            label: '显示',
            value: true
          },
          {
            label: '隐藏',
            value: false
          }
        ]
      },
      {
        type: 'el-select',
        label: '自动播放',
        name: 'autoPlay',
        value: true,
        selectOptions: [
          {
            label: '是',
            value: true
          },
          {
            label: '否',
            value: false
          }
        ]
      },
      {
        type: 'el-select',
        label: '循环播放',
        name: 'loop',
        value: true,
        selectOptions: [
          {
            label: '是',
            value: true
          },
          {
            label: '否',
            value: false
          }
        ]
      }
      // {
      //   type: 'el-slider',
      //   label: '音量',
      //   name: 'volume',
      //   required: false,
      //   placeholder: '',
      //   value: 0.3
      // }
    ]
  }
};
